﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
namespace Demos.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class DemoController : ControllerBase
    {
        [HttpGet("LongTimeRequest")]
        public string LongTimeRequest()
        {
             Thread.Sleep(2000);
            return "OK";
        }

        [HttpGet("LongTimeRequestAsync")]
        public async Task<string> LongTimeRequestAsync()
        {
            await Task.Delay(2000);
            return "OK";
        }
    }
}
